﻿using System.Windows.Controls;

namespace Lib.WPF.Views;
/// <summary>
/// 通用空白页
/// </summary>
public partial class PageEmpty : Page {
    /// <summary>
    /// 创建实例
    /// </summary>
    public static PageEmpty Create(object Parameter = null) {
        return new PageEmpty(Parameter);
    }
    /// <summary>
    /// 构造函数
    /// </summary>
    public PageEmpty(object Parameter = null) {
        InitializeComponent();
        if (Parameter != null) {
            if (Parameter is Control Control) {
                Panel.Children.Clear();
                Panel.Children.Add(Control);
            } else {
                Description.Text = Parameter.ToString();
            }
        }
    }

}
